Changeset 6b061db in git


Ignore:
Timestamp:
16/09/11 03:07:16 (8 years ago)
Author:
Olly Betts <olly@…>
Branches:
add-show-splays, line_contents, master, stereo, svn/github/master, svn/origin/master, svn/tags/1.2.0, svn/tags/1.2.1, svn/tags/1.2.2, svn/tags/1.2.3, svn/tags/1.2.4, svn/tags/1.2.5, svn/trunk, travis-osx
Children:
b00a29a
Parents:
293eec8
Message:

src/gfxcore.cc,src/gfxcore.h,src/mainfrm.cc: Don't redraw the survey
on every mouse movement in the survey pane unless the measuring line
is (or just was) active. (ticket #17)

git-svn-id: file:///home/survex-svn/survex/trunk@3637 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r293eec8 r6b061db  
     1Fri Sep 16 02:05:12 GMT 2011  Olly Betts <olly@survex.com>
     2
     3        * src/gfxcore.cc,src/gfxcore.h,src/mainfrm.cc: Don't redraw the survey
     4          on every mouse movement in the survey pane unless the measuring line
     5          is (or just was) active.  (ticket #17)
     6
    17Thu Sep 15 03:58:59 GMT 2011  Olly Betts <olly@survex.com>
    28
  • src/gfxcore.cc

    r293eec8 r6b061db  
    400400        }
    401401
    402         if (!Animating() && (m_here.IsValid() || m_there.IsValid())) {
     402        if (MeasuringLineActive()) {
    403403            // Draw "here" and "there".
    404404            double hx, hy;
     
    11531153    }
    11541154
    1155     m_Parent->ShowInfo(best);
    11561155    if (best) {
     1156        m_Parent->ShowInfo(best);
    11571157        if (centre) {
    11581158            // FIXME: allow Ctrl-Click to not set there or something?
     
    11671167            ClearTreeSelection();
    11681168        } else {
     1169            m_Parent->ShowInfo(best);
    11691170            double x, y, z;
    11701171            ReverseTransform(point.x, m_YSize - point.y, &x, &y, &z);
     
    14641465{
    14651466    if (!m_here.IsValid()) return;
     1467    bool line_active = MeasuringLineActive();
    14661468    Point old = m_here;
    14671469    m_here.Invalidate();
    1468     RefreshLine(old, m_there, m_here);
     1470    if (line_active || MeasuringLineActive())
     1471        RefreshLine(old, m_there, m_here);
    14691472}
    14701473
    14711474void GfxCore::SetHere(const Point &p)
    14721475{
     1476    bool line_active = MeasuringLineActive();
    14731477    Point old = m_here;
    14741478    m_here = p;
    1475     RefreshLine(old, m_there, m_here);
     1479    if (line_active || MeasuringLineActive())
     1480        RefreshLine(old, m_there, m_here);
    14761481    m_here_is_temporary = false;
    14771482}
     
    29963001    }
    29973002}
     3003
     3004bool GfxCore::MeasuringLineActive() const
     3005{
     3006    if (Animating()) return false;
     3007    return (m_here.IsValid() && !m_here_is_temporary) || m_there.IsValid();
     3008}
  • src/gfxcore.h

    r293eec8 r6b061db  
    453453    void OnExport(const wxString &filename, const wxString &title);
    454454    void SetCursor(GfxCore::cursor new_cursor);
     455    bool MeasuringLineActive() const;
    455456
    456457private:
  • src/mainfrm.cc

    r293eec8 r6b061db  
    18261826{
    18271827    m_Tree->UnselectAll();
    1828     if (!dist_text.empty()) {
    1829         dist_text = wxString();
    1830         UpdateStatusBar();
    1831     }
    18321828    m_Gfx->SetThere();
     1829    ShowInfo(NULL);
    18331830}
    18341831
Note: See TracChangeset for help on using the changeset viewer.