Skip to content

Commit

Permalink
OULAH BIG BUG CRASH
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinp72 committed Apr 12, 2018
1 parent b77a405 commit 4ddb5c5
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/UI/Frames/Game/PicrossFrame.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def grid=(newGrid)
@grid = newGrid
@drag.grid = @grid

#self.redraw
self.redrawIntern

@grid.each_cell_with_index do |cell, line, column|
@cells.get_child_at(@lineOffset + column, @columnOffset + line).cell = cell
Expand All @@ -133,7 +133,7 @@ def grid=(newGrid)
# used when changing the grid inside the map (for evolving maps for example).
# * *Returns* :
# - the object itself
def redraw
def redrawIntern
@lineSolution = @map.lneSolution
@columnSolution = @map.clmSolution

Expand All @@ -151,8 +151,7 @@ def redraw
column + @lineOffset, line + @columnOffset,
1, 1)
end
@drag.reset


self.show_all
if @map.learning? then
@frame.setLearningTextWidth(@oWidth)
Expand All @@ -161,6 +160,18 @@ def redraw
return self
end

##
# Redraw and/or create all the frame for the current picross. This can be
# used when changing the grid inside the map (for evolving maps for example).
# * *Returns* :
# - the object itself
def redraw
self.redrawIntern
@drag.reset

return self
end

##
# Create the PicrossFrame area, with all the CellButton inside
# * *Returns* :
Expand Down

0 comments on commit 4ddb5c5

Please sign in to comment.