Skip to content

Commit

Permalink
Release/v1.2 - Bug fixes
Browse files Browse the repository at this point in the history
This pull request contains the following changes
- Fixes a bug which results in the program crashing if you open an image after saving another
- Fixes an ordering issue in the database creation script
  • Loading branch information
PastaTime authored Sep 8, 2020
1 parent 520e2f4 commit c84a36a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
1 change: 1 addition & 0 deletions client/controller/instance_annotator_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def open_image(self, image_id):
print(self.model.active._list)

self.model.tool.set_current_image_id(image_id)
self.model.tool.set_current_layer_name(None)

def save_image(self, image_canvas):
"""
Expand Down
2 changes: 1 addition & 1 deletion client/screens/paint_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ def set_color(self, color, name=None):
name = self._layer_manager.get_selected()
if name is None:
return
layer_data = self._layer_manager.get(name)

try:
layer_data = self._layer_manager.get(name)
mat = layer_data[STACK_KEY]
if np.any(color):
mat[np.all(mat != (0, 0, 0), axis=-1)] = color
Expand Down
33 changes: 17 additions & 16 deletions database/create_database.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
CREATE DATABASE IF NOT EXISTS `fadb`
CREATE DATABASE IF NOT EXISTS `fadb`;
USE `fadb`;

--
-- Table structure for table `project`
--

DROP TABLE IF EXISTS `project`;
CREATE TABLE `project` (
`project_id` int NOT NULL AUTO_INCREMENT,
`project_name` varchar(80) NOT NULL,
`last_uploaded` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`unlabeled_count` int NOT NULL DEFAULT '0',
`labeled_count` int NOT NULL DEFAULT '0',
PRIMARY KEY (`project_id`),
UNIQUE KEY `project_id_UNIQUE` (`project_id`),
UNIQUE KEY `project_name_UNIQUE` (`project_name`)
) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Table structure for table `image`
--
Expand Down Expand Up @@ -41,18 +57,3 @@ CREATE TABLE `instance_seg_meta` (
CONSTRAINT `image_fid` FOREIGN KEY (`image_id`) REFERENCES `image` (`image_id`)
) ENGINE=InnoDB AUTO_INCREMENT=137 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Table structure for table `project`
--

DROP TABLE IF EXISTS `project`;
CREATE TABLE `project` (
`project_id` int NOT NULL AUTO_INCREMENT,
`project_name` varchar(80) NOT NULL,
`last_uploaded` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`unlabeled_count` int NOT NULL DEFAULT '0',
`labeled_count` int NOT NULL DEFAULT '0',
PRIMARY KEY (`project_id`),
UNIQUE KEY `project_id_UNIQUE` (`project_id`),
UNIQUE KEY `project_name_UNIQUE` (`project_name`)
) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

0 comments on commit c84a36a

Please sign in to comment.