diff options
Diffstat (limited to 'SidebarAdd.cpp')
-rw-r--r-- | SidebarAdd.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/SidebarAdd.cpp b/SidebarAdd.cpp index 78509e0..57de3ee 100644 --- a/SidebarAdd.cpp +++ b/SidebarAdd.cpp @@ -1,5 +1,4 @@ #include "SidebarAdd.h" -#include "edit.h" void SidebarAdd::buttonClicked(GtkButton *button, SidebarAdd *sidebar) { @@ -33,10 +32,10 @@ GtkWidget* SidebarAdd::getWidget() { } void SidebarAdd::update() { - if(!getActiveRoom()) + if(!editor->getActiveRoom()) return; - if(getActiveRoom()->size() > 2 && isPolygonOk(getActiveRoom())) + if(editor->getActiveRoom()->size() > 2 && editor->polygonOk(*editor->getActiveRoom())) gtk_widget_set_sensitive(buttonAdd, TRUE); else gtk_widget_set_sensitive(buttonAdd, FALSE); |