]> git.tdb.fi Git - r2c2.git/commitdiff
Fix some bugs in tools
authorMikko Rasa <tdb@tdb.fi>
Sat, 24 Aug 2013 07:48:34 +0000 (10:48 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 24 Aug 2013 07:48:34 +0000 (10:48 +0300)
source/designer/extendtool.cpp
source/designer/slopetool.cpp

index aa0f72384e2543ec0c73e9abf32de82b4afef168..e35b4abcf13a43c46a53861472cb127a7466bb49 100644 (file)
@@ -244,5 +244,6 @@ vector<Track *> ExtendTool::create_straight(const Vector &start, const Angle &di
 
 void ExtendTool::update_selection(Selection &sel) const
 {
-       sel.replace(extend_tracks.begin(), extend_tracks.end());
+       if(accepted)
+               sel.replace(extend_tracks.begin(), extend_tracks.end());
 }
index 0f6990eeec50abda37799186b19d1dcae8c57c31..869724e68da578e2a7552f6f56fb81ddd13a0744 100644 (file)
@@ -13,6 +13,7 @@ SlopeTool::SlopeTool(Designer &d, Input::Mouse &m, const set<Object *> &objects)
                if(!dynamic_cast<Track *>(*i) || (*i)->get_n_link_slots()!=2)
                {
                        set_status("Must have linear tracks only");
+                       set_done();
                        return;
                }