Commit 68250f85 authored by Jaden Goter's avatar Jaden Goter

Removed unnecessary fields from CompositionGuidelinesOvelay and cleaned up...

Removed unnecessary fields from CompositionGuidelinesOvelay and cleaned up add/remove guidelines methods.
parent 2672abb5
Pipeline #174493 failed with stage
in 8 minutes and 34 seconds
......@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
import cairo
import numpy
from gi.repository import Gtk
from pitivi.utils.loggable import Loggable
......@@ -30,19 +29,8 @@ class CompositionGuidelinesOverlay(Gtk.DrawingArea, Loggable):
Loggable.__init__(self)
self.stack = stack
project = stack.app.project_manager.current_project
project.connect("video-size-changed", self._canvas_size_changed_cb)
self.project_size = numpy.array([project.videowidth,
project.videoheight])
self.__guidelines_to_draw = set()
def _canvas_size_changed_cb(self, project):
project = self.stack.app.project_manager.current_project
self.project_size = numpy.array([project.videowidth,
project.videoheight])
@property
def guidelines_to_draw(self):
return self.__guidelines_to_draw
......@@ -50,16 +38,12 @@ class CompositionGuidelinesOverlay(Gtk.DrawingArea, Loggable):
def add_guideline(self, guideline):
if guideline not in self.guidelines_to_draw:
self.__guidelines_to_draw.add(guideline)
else:
pass
self.queue_draw()
self.queue_draw()
def remove_guideline(self, guideline):
if guideline in self.guidelines_to_draw:
self.__guidelines_to_draw.remove(guideline)
else:
pass
self.queue_draw()
self.queue_draw()
def do_draw(self, cr):
cr.set_operator(cairo.OPERATOR_OVER)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment